<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "{{%web_sales_attr}}".
 *
 * @property integer $id
 * @property integer $product_id
 * @property integer $attr_id
 * @property string $attr_value
 */
class WebSalesAttr extends \common\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%web_sales_attr}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['product_id', 'attr_id', 'attr_value'], 'required'],
            [['product_id', 'attr_id'], 'integer'],
            [['attr_value'], 'string', 'max' => 200]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', 'ID'),
            'product_id' => Yii::t('common', 'Product ID'),
            'attr_id' => Yii::t('common', 'Attr ID'),
            'attr_value' => Yii::t('common', 'Attr Value'),
        ];
    }
}
